﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CostDriverFromCenterToPIPInput.aspx.cs" Inherits="Hisun.View.CostDriver.CostDriverFromCenterToPIPInput" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
   <div class =" CommonPage_MainPanel">
    <div class ="CommonPage_Banner"><div class = "CommomPage_Title">直接费用分配录入</div></div>
    <div class ="CommonPage_Body">

        <table style="width:100%;">
            <tr>
                <td>
                                        <asp:Label ID="Label3" runat="server" Text="过滤条件：" SkinID="Label"></asp:Label>
                    <asp:TextBox ID="TextBox_FilterText" runat="server" SkinID="TextBox"></asp:TextBox>
                    <asp:Button SkinID = "Button" ID="Button_fullCenterList" runat="server" 
                        onclick="Button_fullCenterList_Click" Text="刷新" />
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label1" runat="server" Text="作业中心：" SkinID="Label"></asp:Label>
                    <asp:DropDownList ID="DropDownList_CostCenter" runat="server" Height="30px" 
                        Width="180px" AutoPostBack="True" 
                        onselectedindexchanged="DropDownList_CostCenter_SelectedIndexChanged" 
                        SkinID="DropdownList">
                    </asp:DropDownList>
                    <asp:Button SkinID = "Button" ID="Button_Query" runat="server" oncommand="Button_Query_Command" 
                        Text="查询" />
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td> 
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    <asp:Panel ID="Panel_GridList" runat="server" Visible="False">
                     <asp:Label ID="Label_FullDriver" runat="server" Text="动因量自动填充方式：" SkinID="Label" 
                            ForeColor="Blue"></asp:Label>
                    <asp:Button SkinID = "Button" ID="Button_FullDriver" runat="server" Text="自动填充动因量" 
                        onclick="Button_FullDriver_Click" />
                        <asp:GridView ID="GridView_DriverList" runat="server"  SkinID = "GridView"
                            AutoGenerateColumns="False" 
                            onrowdatabound="GridView_DriverList_RowDataBound" ShowFooter="True">
                            <Columns>
                                <asp:BoundField DataField="产品ID" HeaderText="成本账户ID" />
                                <asp:BoundField DataField="作业中心ID" HeaderText="目标中心ID" />
                                <asp:BoundField DataField="作业中心名称" HeaderText="目标中心名称" />
                                <asp:BoundField DataField="中间体ID" HeaderText="中间体ID" />
                                <asp:BoundField DataField="中间体名称" HeaderText="中间体名称" />
                                <asp:BoundField DataField="产品账户名称" HeaderText="产品账户名称" />
                                <asp:BoundField DataField="系数" HeaderText="费率" />
                                <asp:TemplateField HeaderText="动因量">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox1" runat="server" 
                                        Text='<%# Bind("动因量") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:TextBox ID="TextBox_DriverAmount" runat="server" 
                                        Text='<%# string.Format("{0:F2}", Eval("动因量")) %>'></asp:TextBox>
                                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                            ControlToValidate="TextBox_DriverAmount" 
                                            ErrorMessage="RegularExpressionValidator" 
                                            ValidationExpression="^(([0-9]+\d*)|([0-9]+\d*\.\d{1,2}))$" 
                                            ValidationGroup="Group">*</asp:RegularExpressionValidator>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                        <asp:Button SkinID = "Button" ID="Button_Save" runat="server" oncommand="Button_Save_Command" 
                            Text="保存" ValidationGroup="Group" />
                    </asp:Panel>
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    <asp:HiddenField ID="HiddenField_CurrentCenterId" runat="server" />
                     <asp:HiddenField ID="HiddenField_FullDriverId" runat="server" />
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
    
    </div></div>
    </form>
</body>
</html>
<% =alert%>